import Vue from 'vue'
import Vuex from 'vuex'
import user from './modules/user'
import settings from './modules/settings'

// 下面是注册vuex插件
Vue.use(Vuex)

// 创建全局仓库
// ctrl + z 撤销
// ctrl + shift + z 反撤销
const store = new Vuex.Store({
  // state: {},
  // getters: {},
  // mutations: {},
  // actions: {}
  modules: {
    // user: user,
    user,
    settings
  }
})

// 默认导出
export default store
